z<script>
  $(function() {
  $( ".tabs" ).tabs({
  event: "mouseover"
  });
  });
</script>

<!-- contents -->
<div class='container_24 div_content ui-corner-all'>
  <!-- Bread crumbs -->
  <div class='grid_23 bread_crumbs'>
    <div class='left'>
    <a class='crumb' href='/'>首页</a>
    </div>
  </div>
  <div class='clear'></div>

  <div class='grid_15'>
    <!-- the hotest course -->
    <div class='ui-tabs tabs'>
      <ul class='ui-tabs-nav'>
	<div class='tabs-title left margin-left-10px'>今日热点</div>
      </ul>

      <div class='grid_7 left hot_course margin-left-10px'>
	<?php  $course = $this->top_courses[0];?>
	<div class='margin-top-10px'>
	  <a href="/video/play?cont_id=<?php echo $course['cont_id'];?>">
	    <img class='big-img hotest_course_img' src="<?php echo THUMBNAILS_PREFIX.$course['thumb'];?>"/>
	  </a>
	</div>  
	<div class='margin-top-10px'>
	  <div class='left long_title'><a class='a_course_title' title="<?php echo $course['title'];?>" href="/video/play?cont_id=<?php echo $course['cont_id'];?>"><?php echo $course['title'];?></a></div>
	  <div class='clear'></div>
	</div>
      </div>

      <!-- the other top 4 course -->
      <div class=' left hot_course'>
	<?php for($i=1; $i<count($this->top_courses); $i++){
	      $course = $this->top_courses[$i];?>
	<div class='div_video_img left margin-left-10px margin-top-10px'>
	  <div>
	    <a href="/video/play?cont_id=<?php echo $course['cont_id'];?>">
	      <img class='course_img' src="<?php echo THUMBNAILS_PREFIX.$course['thumb'];?>"/>
	    </a>
	  </div>
	  <div class='margin-top-5px'>
	    <div class='left title'><a class='a_course_title' title="<?php echo $course['title'];?>" href="/video/play?cont_id=<?php echo $course['cont_id'];?>"><?php echo $course['title'];?></a></div>
	  </div>
	</div>
	<?php if($i%2==0){?>
	<div class='clear'></div>
	<?php }}?>
      </div>
      <div class='clear'></div>

    </div>
    <div class='clear'></div>

    <!-- the categories courses -->
    <?php $i=1;foreach($this->cats as $cat){?>
    <div class="ui-tabs tabs">
      <ul class='ui-tabs-nav'>
	<div class='tabs-title right ui-corner-all margin-right-20px'><a class='more' href="/category/select?cat_id=<?php echo $cat['id'];?>"><?php echo $cat['name'];?></a></div>
	<?php $i=1;$tags=array();if (isset($cat['cats']) && count($cat['cats'])>0)
	foreach($cat['cats'] as $tag){?>
	<li><div class="div_tab_title"><a href="#tabs-<?php echo $i;?>"><?php $tags[$i]=$tag;echo $tag;?></a></div></li>
	<?php $i++;}?>
      </ul>
      <?php $i=1;if (isset($cat['cats']) && count($cat['cats'])>0)foreach($cat['cats'] as $tag){?>
      <div class='ui-tabs-panel' id="tabs-<?php echo $i;?>">
	 <?php $j=0;foreach($cat['courses'][$tags[$i]] as $course){
      if ($j<4){?>
	<div class='div_video_img left margin-left-10px'>
	  <div class="div_img">
	    <a href="/video/play?cont_id=<?php echo $course['cont_id'];?>">
	      <img class="course_img" src="<?php echo THUMBNAILS_PREFIX.$course['thumb'];?>"/>
	    </a>
	  </div>
	  <div class="mask">
            <label>
	      <?php echo $course["duration"];?>
            </label>
	  </div>	      

	  <div class='margin-top-10px'>
	    <div class='left title'><a class='a_course_title' title="<?php echo $course['title'];?>" href="/video/play?cont_id=<?php echo $course['cont_id'];?>"><?php echo $course['title'];?></a></div>
	  </div>
	</div>
	<?php }else{?>
	<div class='left more_title margin-left-10px 1margin-top-10px'><a class='a_course_title' title="<?php echo $course['title'];?>" href="/video/play?cont_id=<?php echo $course['cont_id'];?>"><?php echo $course['title'];?></a></div>
	<?php } $j++;?>
	<?php }?>
	<div class='clear'></div>
      </div>
      <?php $i++;}?>
    </div>
    <?php }?>
  </div>
  <div class='grid_8'>
    <div class="ui-tabs tabs">
      <ul class='ui-tabs-nav'>
	<div class='tabs-title left ui-corner-all margin-left-10px'>欢迎您来我爱进步网</div>
      </ul>
      <!-- <div class="div_home_right_box"> -->
      <?php echo '<?php echo $this->render("login.phtml");';?>
      <?php echo '?>';?>
    </div>

    <div class='clear'></div>

    <div class="ui-tabs tabs">
      <ul class='ui-tabs-nav'>
	<div class='tabs-title left ui-corner-all margin-left-10px'>今日推荐</div>
      </ul>
      <!-- <div class='div_home_right_box'> -->
      <div id='div_StrobeMediaPlayback'>
	<object width='100%' height='190' id='StrobeMediaPlayback' name='StrobeMediaPlayback'
		type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'>
	  <param name='movie'value='/static/swfs/StrobeMediaPlayback.swf'/>
	  <param name='quality' value='high'/>
	  <param name='allowScriptAccess' value='always'/>
	  <param name='bgcolor' value='#000000'/>
	  <param name='allowfullscreen'	value='true'/>
	  <param name='flashvars' value= '&src=../vod/<?php echo $this->today_hot_course['path'];?>&autoHideControlBar=false&streamType=recorded&autoPlay=true'/>
	  <embed src='/static/swfs/StrobeMediaPlayback.swf'
		 width='100%'
		 height='190'
		 id='StrobeMediaPlayback'
		 quality='high'
		 allowScriptAccess='always'
		 bgcolor='#000000'
		 name='StrobeMediaPlayback'
		 allowfullscreen='true'
		 pluginspage='http://www.adobe.com/go/getflashplayer'
		 flashvars="&src=../vod/<?php echo $this->today_hot_course['path'];?>&autoHideControlBar=false&streamType=recorded&autoPlay=true"
		 type='application/x-shockwave-flash'>
	  </embed>
	</object>
	<br/>
	<div>
	  <div class='left long_title'><a class='a_course_title' title="<?php echo $course['title'];?>" href="/video/play?cont_id=<?php echo $this->today_hot_course['cont_id'];?>"><?php echo $this->today_hot_course['title'];?> </a></div>
	  <div class='clear'></div>
	</div>
      </div>
    </div>
    <div class='clear'></div>

    <div class="ui-tabs tabs">
      <ul class='ui-tabs-nav'>
	<div class='tabs-title left ui-corner-all margin-left-20px'><a class='more' href="/category/top-played">课程播放排行榜</a></div>
	<!-- <div class='tabs-title left ui-corner-all margin-left-10px'>课程播放排行榜</div> -->
      </ul>
      <div class="box1">
	<?php $i=1;foreach($this->top_10_courses_in_week as $course){?>
	<div class='div_top_course_list grid_8'>
	  <div class='top_course_index <?php if ($i<4)echo "top3";else echo "top7";?>'><?php echo $i;?></div>
	  <div class='top_course_title'>
	    <div class='left long_title'><a title="<?php echo $course['title'];?>" class='a_top_course_title' href="/video/play?cont_id=<?php echo $course['cont_id'];?>"><?php echo $course['title'];?></a></div>
	    <div class='left times'><?php echo $course['sum'];?></div>
	    <div class='right price ui-corner-all'><?php printf('￥%.2f', $course['promotion'] ? $course['dis_price'] : $course['ori_price']);?></div>
	  </div>
	</div>
	<?php $i++;}?>  
	<div class='clear margin-bottom-5px'></div>
      </div>
    </div>

    <div class="ui-tabs tabs">
      <ul class='ui-tabs-nav'>
	<div class='tabs-title left ui-corner-all margin-left-20px'><a class='more' href="/category/user-list">用户排行榜</a></div>
	<!-- <div class='tabs-title left ui-corner-all margin-left-10px'>用户排行榜</div> -->
      </ul>
      <div class="box1">
	<?php $i=1;foreach($this->top_users as $user){?>
	<div class='div_top_course_list grid_8'>
	  <div class='top_course_index <?php if ($i<4)echo "top3";else echo "top7";?>'><?php echo $i;?></div>
	  <div class='top_course_title'>
	    <div class='left long_title'><a title="<?php echo $user['username'];?>" class='a_top_course_title' href="/category/user-content-list?uid=<?php echo $user['id'];?>"><?php echo (isset($user["username"]) && !empty($user["username"])) ? $user["username"] : $user["email"];;?></a></div>
	    <div class='left times'><?php echo $user['play_times'];?></div>
	  </div>
	</div>
	<?php $i++;}?>  
	<div class='clear margin-bottom-5px'></div>
      </div>
    </div>

    <div class="ui-tabs tabs">
      <ul class="ui-tabs-nav">
	<div class="tabs-title left ui-cornet-all margin-left-20px">帮助
	</div>
      </ul> 
      <div class="box1 margin-10px">
	  <a target="_blank" class="medium" href="http://wpa.qq.com/msgrd?v=3&uin=2226149970&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:2226149970:41 &r=0.1387350961050886" alt="客服" title="客服">&nbsp;客服QQ：2226149970</a>
      </div>
    </div>

    <!--
    <div class="ui-tabs tabs">
      <ul class="ui-tabs-nav">
	<div class="tabs-title left ui-cornet-all margin-left-20px">订阅
	</div>
      </ul> 
      <div class="box1 margin-10px align-left">
        <span class="medium">免费通知我最新课程列表</span>
        <form action="/admin/add-subscribe" method="get">
          email: <input type="text" maxlength="64" name="email"/>
          <input type="submit" value="提交"/>
        </form>
      </div>
    </div>
    -->    
  </div>
  <div class='clear'></div>
</div>

